Sunday, 4 October 2020

Top 11 kubernetes interview questions for SDET/DevOps SET-02? Kubernetes deployment commands















 



1. How to create deployment in Kubernetes?
kubectl create deployment <Deplyment-Name> --image=<Container-Image>

2. How to get all deployments in K8s?


kubectl get deployments

3. How to describe the deployment?

kubectl describe deployment <deployment-name>

4. How to scale the deployment?


kubectl scale --replicas=10 deployment/<Deployment-Name>

5. How to expose deployment as a service?

kubectl expose deployment <Deployment-Name> --type=NodePort --port=80 --target-port=80 --name=<ServiceName>

6. How to check the deployment status or rollout status?

kubectl rollout status deployment/<Deployment-Name>

Kubernetes interview question SET-01

7. Get the rollout history of deployment?

kubectl rollout history deployment/<Deployment-Name>

8. How to edit the deployment?

kubectl edit deployment/<Deployment-Name> --record=true

Difference between 401 vs 403

9. How to undo the roolout in deployment?

kubectl rollout undo deployment/my-first-deployment

10. How to kill the existing pods and recreate new pods in a rolling fashion?

kubectl rollout restart deployment/<Deployment-Name>

11. How to pause the deployment?

kubectl rollout pause deployment/<Deployment-Name>
12. Commands for kubernetes POD?
Cick Here for answer 

Want to learn more? ...Check below link for more java interview question:
 

3 comments:

  1. Thanks for sharing this great article..Its really nice and useful for us.
    devops online training

    ReplyDelete
  2. Hi, Thank you for this informative blog, I have just started to learn devops online training and this interview questions blog is definitely very helpful for me. Thank you for this informative blog.

    ReplyDelete

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...